﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Topcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] test1 = new int[] { 5, 4, 3, 2, 1 };
            
            Console.Write(SRM548.KingdomAndTrees.minLevel(test1));
            Console.ReadKey();
        }
    }
}
